from turtle import *


class PositionException(Exception):
    pass


t = Turtle()
s = Screen()
t.pensize(10)
t.speed(0)
t.color("white")
t.fillcolor("cyan")
s.screensize(250, 250, "black")
x = int(input("Offset x: "))
y = int(input("Offset y: "))
k = int(input("Multiplier: "))
if 500 - x - 25 * k * 3 >= 0 and 500 - y - 25 * k * 2 >= 0:
    t.penup()
    t.setpos(-250 + x, 250 - y)
    t.pendown()
    t.begin_fill()
    t.forward(25 * k)
    t.right(90)
    t.forward(25 * k)
    t.left(90)
    t.forward(25 * k)
    t.left(90)
    t.forward(25 * k)
    t.right(90)
    t.forward(25 * k)
    t.right(90)
    t.forward(25 * k * 2)
    t.right(90)
    t.forward(25 * k * 3)
    t.right(90)
    t.forward(25 * k * 2)
    t.right(90)
    t.end_fill()
    done()
else:
    raise PositionException("the figure doesn't fit")